#include <string.h>
#include <unistd.h>
#include <stdio.h>

#include "ec_read_write.h"

int main(int argc, char** argv)
{
#if 0
	printf("sss = %d\n", PMSG_GET_ACTIVEIP);
return 0;
#endif

	if (argc < 2){
	}
	else if (strcmp(argv[1], "GetProductType") == 0){
	}
	else if (strcmp(argv[1], "VideoChip") == 0){
	}
	else{
	}

	unsigned short Index=0x0100;
	int nlen=256;
	unsigned char bufdata[256];

	if(ecio_read_256bytes(Index,nlen,bufdata)==-1)
		printf("read err\n");
	else
	{
		int i;
		printf(" RW    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F \n");
		for(i=0;i<nlen;i++)
		{
			if(i%16== 0)
			{
				printf("\n %02Xh   ",i/16);
			}
			printf("%02X ",bufdata[i]);
		}

	}
	printf("\n");

	//int read_EC_RAM(int addr);
	//read_EC_RAM(0x01);

	//int read_ECIO_RAM(int addr);
	//read_ECIO_RAM(0x00);
	#if 0
	int rtc_read_byte(int nbaseaddr);
	rtc_read_byte(0x0270);
	#endif
	return 0;
}


